import request from '../utils/request';

export const getAllChannels = params => {
  return request({
    url: '/v1_0/channels',
    params
  })
}
// 添加用户频道
export const addUserChannels = channel => {
  return request({
    method: 'PATCH',
    url: '/v1_0/user/channels',
    data: {
      channels: [channel]
    }
  })
}
// 删除指定用户频道
export const delUserChannels = params => {
  return request({
    method: 'DELETE',
    url: `/v1_0/user/channels/${params}`,
    params
  })
}
